home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / include / gnome-vfs-2.0 / libgnomevfs / gnome-vfs-mime-deprecated.h < prev    next >
Encoding:
C/C++ Source or Header  |  2006-05-01  |  6.5 KB  |  136 lines

  1. /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
  2.  
  3. /* 
  4.    Copyright (C) 2000 Eazel, Inc.
  5.  
  6.    The Gnome Library is free software; you can redistribute it and/or
  7.    modify it under the terms of the GNU Library General Public License as
  8.    published by the Free Software Foundation; either version 2 of the
  9.    License, or (at your option) any later version.
  10.  
  11.    The Gnome Library is distributed in the hope that it will be useful,
  12.    but WITHOUT ANY WARRANTY; without even the implied warranty of
  13.    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.     See the GNU
  14.    Library General Public License for more details.
  15.  
  16.    You should have received a copy of the GNU Library General Public
  17.    License along with the Gnome Library; see the file COPYING.LIB.  If not,
  18.    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  19.    Boston, MA 02111-1307, USA.
  20.  
  21.    Author: Maciej Stachowiak <mjs@eazel.com> */
  22.  
  23. #ifndef GNOME_VFS_DISABLE_DEPRECATED
  24.  
  25. #ifndef GNOME_VFS_MIME_DEPRECATED_H
  26. #define GNOME_VFS_MIME_DEPRECATED_H
  27.  
  28. G_BEGIN_DECLS
  29.  
  30. /* ------------------------------
  31.  * From gnome-vfs-mime-handlers.h 
  32.  * ------------------------------
  33.  */
  34.  
  35. typedef enum {
  36.     GNOME_VFS_MIME_ACTION_TYPE_NONE,
  37.     GNOME_VFS_MIME_ACTION_TYPE_APPLICATION,
  38.     GNOME_VFS_MIME_ACTION_TYPE_COMPONENT
  39. } GnomeVFSMimeActionType;
  40.  
  41. /**
  42.  * GnomeVFSMimeAction:
  43.  *
  44.  * This data structure describes an action that can be done 
  45.  * on a file.
  46.  **/
  47. typedef struct _GnomeVFSMimeAction GnomeVFSMimeAction;
  48.  
  49. struct _GnomeVFSMimeAction{
  50.     GnomeVFSMimeActionType action_type;
  51.     union {
  52.         Bonobo_ServerInfo *component;
  53.         void *dummy_component;
  54.         GnomeVFSMimeApplication *application;
  55.     } action;
  56.  
  57.     /* Padded to avoid future breaks in ABI compatibility */
  58.     void *reserved1;
  59. };
  60.  
  61. GnomeVFSMimeActionType   gnome_vfs_mime_get_default_action_type            (const char              *mime_type);
  62. GnomeVFSMimeAction *     gnome_vfs_mime_get_default_action                 (const char              *mime_type);
  63. GnomeVFSMimeApplication *gnome_vfs_mime_application_new_from_id            (const char              *id);
  64. void                     gnome_vfs_mime_action_free                        (GnomeVFSMimeAction      *action);
  65.  
  66. GnomeVFSResult           gnome_vfs_mime_action_launch                      (GnomeVFSMimeAction      *action,
  67.                                         GList                   *uris);
  68. GnomeVFSResult           gnome_vfs_mime_action_launch_with_env             (GnomeVFSMimeAction      *action,
  69.                                         GList                   *uris,
  70.                                         char                   **envp);
  71.                                         
  72. const char          *gnome_vfs_mime_get_icon                (const char             *mime_type);
  73.  
  74. /* List manipulation helper functions */
  75. gboolean                 gnome_vfs_mime_id_in_application_list             (const char              *id,
  76.                                         GList                   *applications);
  77. gboolean                 gnome_vfs_mime_id_in_component_list               (const char              *iid,
  78.                                         GList                   *components);
  79. GList *                  gnome_vfs_mime_remove_application_from_list       (GList                   *applications,
  80.                                         const char              *application_id,
  81.                                         gboolean                *did_remove);
  82. GList *                  gnome_vfs_mime_remove_component_from_list         (GList                   *components,
  83.                                         const char              *iid,
  84.                                         gboolean                *did_remove);
  85. GList *                  gnome_vfs_mime_id_list_from_component_list        (GList                   *components);
  86. GList *                  gnome_vfs_mime_id_list_from_application_list      (GList                   *applications);
  87.  
  88. /* Stored as delta to current user level - API function computes delta and stores in prefs */
  89. GnomeVFSResult           gnome_vfs_mime_add_extension                      (const char              *mime_type,
  90.                                         const char              *extension);
  91. GnomeVFSResult           gnome_vfs_mime_remove_extension                   (const char              *mime_type,
  92.                                         const char              *extension);
  93. GnomeVFSResult           gnome_vfs_mime_set_default_action_type            (const char              *mime_type,
  94.                                         GnomeVFSMimeActionType   action_type);
  95. GnomeVFSResult           gnome_vfs_mime_set_default_application            (const char              *mime_type,
  96.                                         const char              *application_id);
  97. GnomeVFSResult           gnome_vfs_mime_set_default_component              (const char              *mime_type,
  98.                                         const char              *component_iid);
  99. GnomeVFSResult       gnome_vfs_mime_set_icon                (const char             *mime_type,
  100.                                         const char            *filename);
  101. GnomeVFSResult         gnome_vfs_mime_set_description               (const char            *mime_type,
  102.                                         const char            *description);
  103.  
  104. GnomeVFSResult          gnome_vfs_mime_set_can_be_executable          (const char              *mime_type,
  105.                                         gboolean             new_value);
  106.  
  107.  
  108. /* No way to override system list; can only add. */
  109. GnomeVFSResult           gnome_vfs_mime_extend_all_applications            (const char              *mime_type,
  110.                                         GList                   *application_ids);
  111. /* Only "user" entries may be removed. */
  112. GnomeVFSResult           gnome_vfs_mime_remove_from_all_applications       (const char              *mime_type,
  113.                                         GList                   *application_ids);
  114.  
  115.  
  116. GList *                  gnome_vfs_mime_get_short_list_applications        (const char              *mime_type);
  117. GList *                  gnome_vfs_mime_get_short_list_components          (const char              *mime_type);
  118. GnomeVFSResult           gnome_vfs_mime_set_short_list_applications        (const char              *mime_type,
  119.                                         GList                   *application_ids);
  120. GnomeVFSResult           gnome_vfs_mime_set_short_list_components          (const char              *mime_type,
  121.                                         GList                   *component_iids);
  122. GnomeVFSResult           gnome_vfs_mime_add_application_to_short_list      (const char              *mime_type,
  123.                                         const char              *application_id);
  124. GnomeVFSResult           gnome_vfs_mime_remove_application_from_short_list (const char              *mime_type,
  125.                                         const char              *application_id);
  126. GnomeVFSResult           gnome_vfs_mime_add_component_to_short_list        (const char              *mime_type,
  127.                                         const char              *iid);
  128. GnomeVFSResult           gnome_vfs_mime_remove_component_from_short_list   (const char              *mime_type,
  129.                                         const char              *iid);
  130.  
  131. G_END_DECLS
  132.  
  133. #endif /* GNOME_VFS_MIME_DEPRECATED_H */
  134.  
  135. #endif /* GNOME_VFS_DISABLE_DEPRECATED */
  136.